<?php
Class Card extends CI_Model
{
	
	//private $tableName = "cards";
	public function __construct() {
		parent::__construct();	
	}
	
	public function getAllCards(){
		$query = $this->db->get('cards');
		return $query->result();
	}
	
	public function getNewSetOfShuffledCards(){
		$this->db->order_by('rank', 'RANDOM');
		$this->db->limit(13);// for testing
		$query = $this->db->get('cards');
		return $query->result();
	}
	public function getSuitByCardId($cardId){
		$this->db->where("id",$cardId);
		$this->db->get('cards')->first_row()->suit;
	}
}
?>